Optimal. Leaf size=61 \[ \frac {(4 A+3 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x (4 A+3 C)+\frac {C \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3014, 2635, 8} \[ \frac {(4 A+3 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x (4 A+3 C)+\frac {C \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3014
Rubi steps
\begin {align*} \int \cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx &=\frac {C \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (4 A+3 C) \int \cos ^2(c+d x) \, dx\\ &=\frac {(4 A+3 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {C \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{8} (4 A+3 C) \int 1 \, dx\\ &=\frac {1}{8} (4 A+3 C) x+\frac {(4 A+3 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {C \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 45, normalized size = 0.74 \[ \frac {4 (4 A+3 C) (c+d x)+8 (A+C) \sin (2 (c+d x))+C \sin (4 (c+d x))}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 49, normalized size = 0.80 \[ \frac {{\left (4 \, A + 3 \, C\right )} d x + {\left (2 \, C \cos \left (d x + c\right )^{3} + {\left (4 \, A + 3 \, C\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 43, normalized size = 0.70 \[ \frac {1}{8} \, {\left (4 \, A + 3 \, C\right )} x + \frac {C \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {{\left (A + C\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 65, normalized size = 1.07 \[ \frac {C \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 73, normalized size = 1.20 \[ \frac {{\left (d x + c\right )} {\left (4 \, A + 3 \, C\right )} + \frac {{\left (4 \, A + 3 \, C\right )} \tan \left (d x + c\right )^{3} + {\left (4 \, A + 5 \, C\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.78, size = 67, normalized size = 1.10 \[ x\,\left (\frac {A}{2}+\frac {3\,C}{8}\right )+\frac {\left (\frac {A}{2}+\frac {3\,C}{8}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^3+\left (\frac {A}{2}+\frac {5\,C}{8}\right )\,\mathrm {tan}\left (c+d\,x\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.95, size = 158, normalized size = 2.59 \[ \begin {cases} \frac {A x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {A x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {A \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {3 C x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 C x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 C x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 C \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 C \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\relax (c )}\right ) \cos ^{2}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________